package org.micro.frame.mybatis.plus.controller;

import org.micro.frame.mybatis.plus.mapper.test1.Users1Mapper;
import org.micro.frame.mybatis.plus.mapper.test2.Users2Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

@RestController
public class UsersController {

    @Autowired
    private Users1Mapper users1Mapper;

    @Autowired
    private Users2Mapper users2Mapper;


    @RequestMapping(value = "hello/{id}", method = RequestMethod.POST)
    public Object hello(@PathVariable Long id) {
        Map<String, Object> map = new HashMap<>(2);
        map.put("users1Mapper", users1Mapper.single(1L));
        map.put("users2Mapper", users2Mapper.single(4L));
        return map;
    }

}
